#ifndef __I_SOCKET_LOW_H_INCLUDED__
#define __I_SOCKET_LOW_H_INCLUDED__

#include "irrString.h"
#include "ISocket.h"



namespace game
{
	namespace net
	{

 extern "C"
{
	class INetworkDriver;
}


		class ISocketLow : public ISocket
		{
		public:
			virtual ~ISocketLow()
			{
			}

		virtual void setInfo(INetworkDriver* networkDriver, int socketIndex)=0;

			//! Connect the socket
			/** \param HostName: hostname or ip address to connect to, if this param is ommitted the socket will not be connected
			\param Port: the port number
			When the socket succesfully connects the event onConnect is raised, otherwise the event onError will be called.
			*/
			virtual void connectTo(c8* HostName, int Port)=0;

			//! Close the current connection
			virtual void closeSocket()=0;

			//! Send data
			virtual void write(c8* data)=0;

			//! Write line
			virtual void writeLine(c8* data)=0;

			virtual void writeBytes(c8* data, int size)=0;

			//! Send data
			virtual void writeBytes(irr::core::stringb& data)=0;

			//! Send data
			virtual void writeBytes(irr::core::stringb* data)=0;

			//! Get received data
			virtual bool getData(irr::core::stringb* buffer)=0;

			//! Read line
			virtual bool readLine(irr::core::stringc* buffer)=0;

			//! Returns true if the socket is connected
			virtual bool isConnected()=0;

			//! Get socket id
			virtual int getSocketId()=0;

			//! Gets the socket index
			virtual int getIndex()=0;

			virtual bool getConnectError()=0;

			virtual bool getCatchEvent()=0 ;
			
			virtual bool getConnected()=0 ;
			
			virtual void unsetCatchEvent()=0;
			
			virtual E_SOCK_ERROR_CODES getError()=0 ;

			virtual irr::core::stringc& getRemoteIP()=0 ;
			
			virtual irr::core::stringc& getRemoteHost()=0 ;

			virtual irr::core::stringb* getBufferIn()=0 ;
			
			virtual irr::core::stringb* getBufferOut()=0 ;
			
			virtual bool isPerformingConn()=0;
			
			virtual void unsetPerform()=0;

			virtual int getConnTimeout()=0;
		};
	}
}
#endif